<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h2>显示用户图片</h2>
    <hr>
    {% load static %}

    <p>用户名：{{ user.name }}</p>
    <p>头像：<img src="{% static user.icon %}" width="200"></p>

    <hr>
    <h3>{{ user.name }}的相册</h3>
    {% for photo in user.photomodel_set.all %}
        <img src="{% static photo.img %}" width=100>
    {% endfor %}






</body>
</html>